package com.yitianyigexiangfa.redis.startup.cluster;

import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisCluster;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Bill Lau
 * @date 2017-11-24
 */
public class JedisClusterUseExample {

    public static void main(String[] args) {
        Set<HostAndPort> jedisClusterNodes = new HashSet<HostAndPort>();
        jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7000));
        JedisCluster jc = new JedisCluster(jedisClusterNodes);
        String liubei = jc.get("liubei");
        System.out.println(liubei);
    }

}
